﻿using System;

namespace Fuse8.DomainFramework.BusinessService
{
    /// <summary>
    /// 
    /// </summary>
    public interface IBusinessServiceEventsSuccessor<in T>
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        SuccessorResult OnCreating(T entity);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        void OnCreated(T entity);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        SuccessorResult OnUpdating(T entity);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        void OnUpdated(T entity);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        SuccessorResult OnDeleting(T entity);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        void OnDeleted(T entity);

        /// <summary>
        /// 
        /// </summary>
        int Order { get; }
    }
}